<template>
  <div>
    <!-- <router-link
      tag="div"
      :to="`/order/create/${item.id}`"
      v-for="item in list"
      :key="item.id"
      class="m-v-10 bg-white p-v-15 p-h-10"
    >-->
    <div
      @click="$toast('暂未开放')"
      v-for="item in list"
      :key="item.id"
      class="m-v-10 bg-white p-v-15 p-h-10"
    >
      <div class="fs-14 flex j-between">
        <p class="text-grey">下单时间: {{item.dtime}}</p>
        <!-- 1 已下单 2交易完成 3已评价 4已取消 -->
        <span v-if="item.status === 1" class="text-blue fs-12">已下单</span>
        <span v-if="item.status === 2" class="text-yellow fs-12">交易完成</span>
        <span v-if="item.status === 3" class="text-grey fs-12">已评价</span>
        <span v-if="item.status === 4" class="text-grey fs-12">已取消</span>
      </div>
      <div class="flex j-between m-t-10">
        <div class="max-w-200 w-80">
          <img class="w-full b-r-4" :src="item.picture" alt="logo" />
        </div>
        <div class="relative flex-1 m-l-10 text-title fs-14">
          <p class="fs-14 text-content overflow-one">{{item.gname}}</p>
          <p class="fs-12 text-grey p-t-5">会员昵称: {{item.vnc}}</p>
          <p class="fs-12 text-grey">会员账号: {{item.vid}}</p>
          <!-- method 1. 折扣 2. 现金 -->
          <p class="absolute bottom-0" v-if="item.method === 1">
            <span class="text-red fs-16">¥{{item.nprice}}</span>
            <s class="text-grey m-l-5 fs-12">¥{{item.fprice}}</s>
          </p>
          <p class="absolute bottom-0" v-else>
            <span class="text-red">{{parseFloat(item.zk / 10) || '-'}}折</span>
            <s class="text-grey m-l-5 fs-12">¥{{item.fprice}}</s>
          </p>
        </div>
      </div>
    </div>
    <!-- </router-link> -->
  </div>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      required: true
    }
  }
}
</script>
